<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
import Navbar from '@/components/Navbar'
import {getTopics} from '@/request/api'

export default {
  name: 'App',
  metaInfo: {
    title: '首页',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' }
    ]
  },
  components: {
    Navbar
  },
  created() {
    getTopics().then(res => {
      console.log(res);
      this.$store.state.topics = res.data;
    })
  }
}
</script>

<style lang="less">
*{
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none
}

body{
  padding-top: 44px;
}

#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  height: auto;
} 
/* 隐藏滚动条 */
::-webkit-scrollbar{
  background: transparent;
  width: 0;
  height: 0;
}
</style>
